package net.zoneland.knowledge.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 省公司任务主工单.
 */
@Data
public class TaskReminderMainWork implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id.
     */
    private String id;

    /**
     * 党办工单编号.
     */
    private String workOrderId;

    /**
     * 落实事项描述.
     */
    private String matterDescription;

    /**
     * 落实责任人ID.
     */
    private String userId;

    /**
     * 落实责任人姓名.
     */
    private String userName;

    /**
     * 三会一课关键词.
     */
    private String sanKeKeywords;

    /**
     * 工作特性（必做、选做）.
     */
    private int workType;

    /**
     * 创建时间.
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新时间.
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 是否删除(0否，1是).
     */
    private int del;

    /**
     * 工单状态（已下发、未下发）.
     */
    private String workStatus;

    /**
     * 接收人员ids.
     */
    private String senderIds;

    /**
     * 公司名称
     */
    private String companyName;

    /**
     * 支部orgUuid
     */
    private String orgUuid;

    /**
     * 支部名称
     */
    private String partyBranch;

    /**
     * 处理人Id
     */
    private String handlerId;

    /**
     * 处理人姓名
     */
    private String handlerName;

    private List<TaskReminderSubWork> taskReminderSubWorks;

    /**
     * 下发类型
     */
    private String issuedType;

    /**
     * 工单处理状态（待处理，接受，拒绝）
     */
    private String readType;

    /**
     * 父工单编号
     */
    private String parentWorkId;

    /**
     * 任务状态
     */
    private String taskStatus;

    /**
     * 更新时间.
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime issuedTime;

    /**
     * 完成状态
     */
    private String finishStatus;

    /**
     * 会议id
     */
    private String meetingIds;

    /**
     * 工单总数
     */
    private Integer mainWorkTotal;

    /**
     * 已完成数量
     */
    private Integer finishMainWorkCount;


    private List<BranchAttachment> attachments;

    /**
     * 完成时间.
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime finishTime;

    /**
     * 子项内容描述
     */
    private String subWorkDescriptions;

    /**
     * 子项细化说明
     */
    private String detailedDescriptions;
}
